In [21]:
#The code in this cell is optional and only used to produce the image below
#Skip if needed
from IPython.display import Image, display
display(Image(filename='EDA.png', embed=True))
In [20]:
!pip install pandas-profiling
Requirement already satisfied: pandas-profiling in c:\users\yvkch\anaconda4\lib\site-packages (2.3.0)
Requirement already satisfied: matplotlib>=1.4 in c:\users\yvkch\anaconda4\lib\site-packages (from pandas-profiling) (3.1.3)
Requirement already satisfied: htmlmin>=0.1.12 in c:\users\yvkch\anaconda4\lib\site-packages (from pandas-profiling) (0.1.12)
Requirement already satisfied: phik>=0.9.8 in c:\users\yvkch\anaconda4\lib\site-packages (from pandas-profiling) (0.9.12)
Requirement already satisfied: confuse>=1.0.0 in c:\users\yvkch\anaconda4\lib\site-packages (from pandas-profiling) (1.1.0)
Requirement already satisfied: pandas>=0.19 in c:\users\yvkch\anaconda4\lib\site-packages (from pandas-profiling) (1.0.5)
Requirement already satisfied: missingno>=0.4.2 in c:\users\yvkch\anaconda4\lib\site-packages (from pandas-profiling) (0.4.2)
Requirement already satisfied: astropy in c:\users\yvkch\anaconda4\lib\site-packages (from pandas-profiling) (4.0)
Requirement already satisfied: jinja2>=2.8 in c:\users\yvkch\anaconda4\lib\site-packages (from pandas-profiling) (2.11.1)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\yvkch\anaconda4\lib\site-packages (from matplotlib>=1.4->pandas-profiling) (1.1.0)
Requirement already satisfied: cycler>=0.10 in c:\users\yvkch\anaconda4\lib\site-packages (from matplotlib>=1.4->pandas-profiling) (0.10.0)
Requirement already satisfied: numpy>=1.11 in c:\users\yvkch\anaconda4\lib\site-packages (from matplotlib>=1.4->pandas-profiling) (1.18.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\yvkch\anaconda4\lib\site-packages (from matplotlib>=1.4->pandas-profiling) (2.4.6)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\yvkch\anaconda4\lib\site-packages (from matplotlib>=1.4->pandas-profiling) (2.8.1)
Requirement already satisfied: scipy>=1.1.0 in c:\users\yvkch\anaconda4\lib\site-packages (from phik>=0.9.8->pandas-profiling) (1.4.1)
Requirement already satisfied: numba>=0.38.1 in c:\users\yvkch\anaconda4\lib\site-packages (from phik>=0.9.8->pandas-profiling) (0.48.0)
Requirement already satisfied: joblib>=0.14.1 in c:\users\yvkch\anaconda4\lib\site-packages (from phik>=0.9.8->pandas-profiling) (0.14.1)
Requirement already satisfied: pyyaml in c:\users\yvkch\anaconda4\lib\site-packages (from confuse>=1.0.0->pandas-profiling) (5.3)
Requirement already satisfied: pytz>=2017.2 in c:\users\yvkch\anaconda4\lib\site-packages (from pandas>=0.19->pandas-profiling) (2019.3)
Requirement already satisfied: seaborn in c:\users\yvkch\anaconda4\lib\site-packages (from missingno>=0.4.2->pandas-profiling) (0.10.0)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\yvkch\anaconda4\lib\site-packages (from jinja2>=2.8->pandas-profiling) (1.1.1)
Requirement already satisfied: setuptools in c:\users\yvkch\anaconda4\lib\site-packages (from kiwisolver>=1.0.1->matplotlib>=1.4->pandas-profiling) (45.2.0.post20200210)
Requirement already satisfied: six in c:\users\yvkch\anaconda4\lib\site-packages (from cycler>=0.10->matplotlib>=1.4->pandas-profiling) (1.14.0)
Requirement already satisfied: llvmlite<0.32.0,>=0.31.0dev0 in c:\users\yvkch\anaconda4\lib\site-packages (from numba>=0.38.1->phik>=0.9.8->pandas-profiling) (0.31.0)
Executing shutdown due to inactivity...
2020-07-28 07:01:45,820 - INFO     - Executing shutdown due to inactivity...
Executing shutdown...
2020-07-28 07:01:50,060 - INFO     - Executing shutdown...
In [5]:
#Package 1: Pandas_Profiling
import pandas as pd
import pandas_profiling
from pandas_profiling import ProfileReport

df=pd.read_csv("German_Credit.csv", encoding="Latin-1")
In [6]:
#Creation of report using Pandas Profiling
pandas_profiling.ProfileReport(df)

#Using below report, you can now toggle between variables, correlations, missing values etc
Out[6]:

In [24]:
#The code in this cell is optional and only used to produce the image
#Skip if needed
from IPython.display import Image, display
display(Image(filename='pf.png', embed=True))
In [8]:
#Creation of HTML report with the output generated with pandas-profiling
profile = pandas_profiling.ProfileReport(df)
profile.to_file("./German Credit DataProfiling_Report.html")
In [9]:
#Package 2: Sweetviz
!pip install sweetviz
Collecting sweetviz
  Using cached sweetviz-1.0b5-py3-none-any.whl (325 kB)
Requirement already satisfied: jinja2>=2.11.1 in c:\users\yvkch\anaconda4\lib\site-packages (from sweetviz) (2.11.1)
Requirement already satisfied: scipy>=1.3.2 in c:\users\yvkch\anaconda4\lib\site-packages (from sweetviz) (1.4.1)
Requirement already satisfied: numpy>=1.16.0 in c:\users\yvkch\anaconda4\lib\site-packages (from sweetviz) (1.18.1)
Requirement already satisfied: matplotlib>=3.1.3 in c:\users\yvkch\anaconda4\lib\site-packages (from sweetviz) (3.1.3)
Collecting importlib-resources>=1.2.0
  Using cached importlib_resources-3.0.0-py2.py3-none-any.whl (23 kB)
Requirement already satisfied: pandas!=1.0.0,!=1.0.1,!=1.0.2,>=0.25.3 in c:\users\yvkch\anaconda4\lib\site-packages (from sweetviz) (1.0.5)
Requirement already satisfied: tqdm>=4.43.0 in c:\users\yvkch\anaconda4\lib\site-packages (from sweetviz) (4.48.0)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\yvkch\anaconda4\lib\site-packages (from jinja2>=2.11.1->sweetviz) (1.1.1)
Requirement already satisfied: cycler>=0.10 in c:\users\yvkch\anaconda4\lib\site-packages (from matplotlib>=3.1.3->sweetviz) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\yvkch\anaconda4\lib\site-packages (from matplotlib>=3.1.3->sweetviz) (1.1.0)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\yvkch\anaconda4\lib\site-packages (from matplotlib>=3.1.3->sweetviz) (2.8.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\yvkch\anaconda4\lib\site-packages (from matplotlib>=3.1.3->sweetviz) (2.4.6)
Requirement already satisfied: zipp>=0.4; python_version < "3.8" in c:\users\yvkch\anaconda4\lib\site-packages (from importlib-resources>=1.2.0->sweetviz) (2.2.0)
Requirement already satisfied: pytz>=2017.2 in c:\users\yvkch\anaconda4\lib\site-packages (from pandas!=1.0.0,!=1.0.1,!=1.0.2,>=0.25.3->sweetviz) (2019.3)
Requirement already satisfied: six in c:\users\yvkch\anaconda4\lib\site-packages (from cycler>=0.10->matplotlib>=3.1.3->sweetviz) (1.14.0)
Requirement already satisfied: setuptools in c:\users\yvkch\anaconda4\lib\site-packages (from kiwisolver>=1.0.1->matplotlib>=3.1.3->sweetviz) (45.2.0.post20200210)
Installing collected packages: importlib-resources, sweetviz
Successfully installed importlib-resources-3.0.0 sweetviz-1.0b5
In [10]:
# importing sweetviz
import sweetviz as sv

#analyzing the dataset
advert_report = sv.analyze(df)

#display the report
advert_report.show_html('GC_SweetViz.html')

#With the report produced by Sweetviz, you can hover to see the associations and other univariate statistics with var
:FEATURES DONE:                    |█████████████████████| [100%]   00:05  -> (00:00 left)
:PAIRWISE DONE:                    |█████████████████████| [100%]   00:00  -> (00:00 left)
Creating Associations graph... DONE!
Report GC_SweetViz.html was generated! NOTEBOOK/COLAB USERS: no browser will pop up, the report is saved in your notebook/colab files.
In [22]:
#The code in this cell is optional and only used to produce the image
#Skip if needed
from IPython.display import Image, display
display(Image(filename='sv.png', embed=True))
In [15]:
#Package 3: dtale 
!pip install --upgrade dtale
Collecting dtale
  Downloading dtale-1.11.0-py2.py3-none-any.whl (7.6 MB)
Requirement already satisfied, skipping upgrade: future>=0.14.0 in c:\users\yvkch\anaconda4\lib\site-packages (from dtale) (0.18.2)
Requirement already satisfied, skipping upgrade: statsmodels in c:\users\yvkch\anaconda4\lib\site-packages (from dtale) (0.11.0)
Requirement already satisfied, skipping upgrade: requests in c:\users\yvkch\anaconda4\lib\site-packages (from dtale) (2.22.0)
Requirement already satisfied, skipping upgrade: scikit-learn>='0.21.0 in c:\users\yvkch\anaconda4\lib\site-packages (from dtale) (0.22)
Collecting dash-colorscales
  Downloading dash_colorscales-0.0.4.tar.gz (62 kB)
Requirement already satisfied, skipping upgrade: Flask>=1.0 in c:\users\yvkch\anaconda4\lib\site-packages (from dtale) (1.1.1)
Collecting dash-bootstrap-components
  Downloading dash-bootstrap-components-0.10.3.tar.gz (107 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Requirement already satisfied, skipping upgrade: pandas in c:\users\yvkch\anaconda4\lib\site-packages (from dtale) (1.0.5)
Requirement already satisfied, skipping upgrade: scipy in c:\users\yvkch\anaconda4\lib\site-packages (from dtale) (1.4.1)
Collecting lz4; python_version > "3.0"
  Downloading lz4-3.1.0-cp37-cp37m-win_amd64.whl (162 kB)
Collecting dash>=1.5.0
  Downloading dash-1.14.0.tar.gz (70 kB)
Collecting xarray
  Downloading xarray-0.16.0-py3-none-any.whl (704 kB)
Collecting Flask-Compress
  Downloading Flask-Compress-1.5.0.tar.gz (6.5 kB)
Collecting dash-daq
  Downloading dash_daq-0.5.0.tar.gz (642 kB)
Requirement already satisfied, skipping upgrade: itsdangerous in c:\users\yvkch\anaconda4\lib\site-packages (from dtale) (1.1.0)
Requirement already satisfied, skipping upgrade: six in c:\users\yvkch\anaconda4\lib\site-packages (from dtale) (1.14.0)
Collecting flask-ngrok; python_version > "3.0"
  Downloading flask_ngrok-0.0.25-py3-none-any.whl (3.1 kB)
Requirement already satisfied, skipping upgrade: numpy>=1.14 in c:\users\yvkch\anaconda4\lib\site-packages (from statsmodels->dtale) (1.18.1)
Requirement already satisfied, skipping upgrade: patsy>=0.5 in c:\users\yvkch\anaconda4\lib\site-packages (from statsmodels->dtale) (0.5.1)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in c:\users\yvkch\anaconda4\lib\site-packages (from requests->dtale) (3.0.4)
Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in c:\users\yvkch\anaconda4\lib\site-packages (from requests->dtale) (2.8)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\yvkch\anaconda4\lib\site-packages (from requests->dtale) (1.25.8)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in c:\users\yvkch\anaconda4\lib\site-packages (from requests->dtale) (2019.11.28)
Requirement already satisfied, skipping upgrade: joblib>=0.11 in c:\users\yvkch\anaconda4\lib\site-packages (from scikit-learn>='0.21.0->dtale) (0.14.1)
Requirement already satisfied, skipping upgrade: Werkzeug>=0.15 in c:\users\yvkch\anaconda4\lib\site-packages (from Flask>=1.0->dtale) (1.0.0)
Requirement already satisfied, skipping upgrade: Jinja2>=2.10.1 in c:\users\yvkch\anaconda4\lib\site-packages (from Flask>=1.0->dtale) (2.11.1)
Requirement already satisfied, skipping upgrade: click>=5.1 in c:\users\yvkch\anaconda4\lib\site-packages (from Flask>=1.0->dtale) (7.0)
Requirement already satisfied, skipping upgrade: pytz>=2017.2 in c:\users\yvkch\anaconda4\lib\site-packages (from pandas->dtale) (2019.3)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.6.1 in c:\users\yvkch\anaconda4\lib\site-packages (from pandas->dtale) (2.8.1)
Requirement already satisfied, skipping upgrade: plotly in c:\users\yvkch\anaconda4\lib\site-packages (from dash>=1.5.0->dtale) (4.4.1)
Collecting dash_renderer==1.6.0
  Downloading dash_renderer-1.6.0.tar.gz (1.2 MB)
Collecting dash-core-components==1.10.2
  Downloading dash_core_components-1.10.2.tar.gz (3.4 MB)
Collecting dash-html-components==1.0.3
  Downloading dash_html_components-1.0.3.tar.gz (187 kB)
Collecting dash-table==4.9.0
  Downloading dash_table-4.9.0.tar.gz (1.8 MB)
Requirement already satisfied, skipping upgrade: setuptools>=41.2 in c:\users\yvkch\anaconda4\lib\site-packages (from xarray->dtale) (45.2.0.post20200210)
Collecting brotli
  Downloading Brotli-1.0.7-cp37-cp37m-win_amd64.whl (358 kB)
Requirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in c:\users\yvkch\anaconda4\lib\site-packages (from Jinja2>=2.10.1->Flask>=1.0->dtale) (1.1.1)
Requirement already satisfied, skipping upgrade: retrying>=1.3.3 in c:\users\yvkch\anaconda4\lib\site-packages (from plotly->dash>=1.5.0->dtale) (1.3.3)
Building wheels for collected packages: dash-colorscales, dash-bootstrap-components, dash, Flask-Compress, dash-daq, dash-renderer, dash-core-components, dash-html-components, dash-table
  Building wheel for dash-colorscales (setup.py): started
  Building wheel for dash-colorscales (setup.py): finished with status 'done'
  Created wheel for dash-colorscales: filename=dash_colorscales-0.0.4-py3-none-any.whl size=62603 sha256=74b45e8c424b24a437f66fffb1c1341c9f8c4bd5b5a09d2550803ff6fd8fd4e4
  Stored in directory: c:\users\yvkch\appdata\local\pip\cache\wheels\2f\22\7e\183ba2af565e3eb955021fbb4fe8fe4a6b1ed8ae3e5c03236a
  Building wheel for dash-bootstrap-components (PEP 517): started
  Building wheel for dash-bootstrap-components (PEP 517): finished with status 'done'
  Created wheel for dash-bootstrap-components: filename=dash_bootstrap_components-0.10.3-py3-none-any.whl size=179491 sha256=696a9591c162b1a6a9d3952b7942864ede2d35196bd6f5a25a35fea4cf644614
  Stored in directory: c:\users\yvkch\appdata\local\pip\cache\wheels\7d\e7\e6\225ffdad437ee57f52b2d437c716f27edfe277236c7b860b7e
  Building wheel for dash (setup.py): started
  Building wheel for dash (setup.py): finished with status 'done'
  Created wheel for dash: filename=dash-1.14.0-py3-none-any.whl size=80132 sha256=e583fffdbab85e00a88768dad9c50b4d82e266568e29140e1f095bb4788f7a72
  Stored in directory: c:\users\yvkch\appdata\local\pip\cache\wheels\77\53\27\031b701ce8077990289c07ea1298e5a217fab3a4639b168856
  Building wheel for Flask-Compress (setup.py): started
  Building wheel for Flask-Compress (setup.py): finished with status 'done'
  Created wheel for Flask-Compress: filename=Flask_Compress-1.5.0-py3-none-any.whl size=5277 sha256=6a2b450cd3baabb8a63a5e2051cc81e2137e7d76c73dfde20971697b104ad005
  Stored in directory: c:\users\yvkch\appdata\local\pip\cache\wheels\d6\9f\c9\4bf2abf65cceaa8d19423bc34b88443b3b063f167d2082c212
  Building wheel for dash-daq (setup.py): started
  Building wheel for dash-daq (setup.py): finished with status 'done'
  Created wheel for dash-daq: filename=dash_daq-0.5.0-py3-none-any.whl size=669707 sha256=6711d311850971a811e4cf77fa8acb0e004b8ab571ac82a4e5de9fad22283765
  Stored in directory: c:\users\yvkch\appdata\local\pip\cache\wheels\fe\54\53\a8d448db5592874db4313240571ca2c069e55f6a6b29bf5847
  Building wheel for dash-renderer (setup.py): started
  Building wheel for dash-renderer (setup.py): finished with status 'done'
  Created wheel for dash-renderer: filename=dash_renderer-1.6.0-py3-none-any.whl size=1182223 sha256=16e65f10c3c6e67fe33fc2aaf3e0e2f241cdbf09063b2bd11831f91d2c27d802
  Stored in directory: c:\users\yvkch\appdata\local\pip\cache\wheels\37\31\d9\3b53bbe9389c1ff7b0ac2ec25e811cf2303009e426243eaf61
  Building wheel for dash-core-components (setup.py): started
  Building wheel for dash-core-components (setup.py): finished with status 'done'
  Created wheel for dash-core-components: filename=dash_core_components-1.10.2-py3-none-any.whl size=3457327 sha256=c2876ddbb2f9cd6e16f7eace017da33597b1e630a7c6f9fbca4ad933f8c4c84c
  Stored in directory: c:\users\yvkch\appdata\local\pip\cache\wheels\17\97\01\848073c7de32c1381023e5cf42d66ce4d6aa1608dbb93a983a
  Building wheel for dash-html-components (setup.py): started
  Building wheel for dash-html-components (setup.py): finished with status 'done'
  Created wheel for dash-html-components: filename=dash_html_components-1.0.3-py3-none-any.whl size=427310 sha256=4f8c2984c2d6b55629b5627a4b65476bed8a58eff755cb3c4a98fb8b02718e3a
  Stored in directory: c:\users\yvkch\appdata\local\pip\cache\wheels\36\34\f9\c3d147461b28467d5bbd14d255be66f6728a1580ff9fbebece
  Building wheel for dash-table (setup.py): started
  Building wheel for dash-table (setup.py): finished with status 'done'
  Created wheel for dash-table: filename=dash_table-4.9.0-py3-none-any.whl size=1780771 sha256=89395d4c5b4b45b7bc254f06003e14c6139d02da78b26b1c8c94bc548444e88c
  Stored in directory: c:\users\yvkch\appdata\local\pip\cache\wheels\44\aa\7a\73ca1e791ccd10a7f9863fbcf7266f5f6dc1a69aedf045a3c8
Successfully built dash-colorscales dash-bootstrap-components dash Flask-Compress dash-daq dash-renderer dash-core-components dash-html-components dash-table
Installing collected packages: dash-colorscales, brotli, Flask-Compress, dash-renderer, dash-core-components, dash-html-components, dash-table, dash, dash-bootstrap-components, lz4, xarray, dash-daq, flask-ngrok, dtale
Successfully installed Flask-Compress-1.5.0 brotli-1.0.7 dash-1.14.0 dash-bootstrap-components-0.10.3 dash-colorscales-0.0.4 dash-core-components-1.10.2 dash-daq-0.5.0 dash-html-components-1.0.3 dash-renderer-1.6.0 dash-table-4.9.0 dtale-1.11.0 flask-ngrok-0.0.25 lz4-3.1.0 xarray-0.16.0
In [17]:
import dtale
import pandas as pd
df = pd.read_csv('German_Credit.csv')

#Creation of report with dtale and opening in new browser
d = dtale.show(df)
d.open_browser()

#The report produced by dtales will give you an optin to plot, filter, and all variations of univariate statistics
In [23]:
#The code in this cell is optional and only used to produce the image
#Skip if needed
from IPython.display import Image, display
display(Image(filename='dt.png', embed=True))